﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace QuanLyThuVien_2.Framework
{
    class Statistics
    {
        private static Graphics g;

        public static Panel DrawStatistics(int PanelWidth,int PanelHeight,Color PanelBackGroundColor,List<String> List_Text_Ox, List<String> List_Text_Oy,int StatisticsWidth,int StatisticsHeight, int distance_Oy)
        {
            Panel pnl = new Panel();
            g = pnl.CreateGraphics();
            Point p_O = new Point((PanelWidth - StatisticsWidth)/2,PanelHeight - (PanelHeight - StatisticsHeight)/2);
            Point pEnd_Ox_Statistics = new Point(PanelWidth - (PanelWidth-StatisticsWidth)/2,PanelHeight - (PanelHeight - StatisticsHeight)/2);
            Point pEnd_Oy_statistics = new Point((PanelWidth-StatisticsWidth)/2,(PanelHeight - StatisticsHeight)/2);
            g.DrawLine(new Pen(Color.White), p_O, pEnd_Ox_Statistics);
            for (int i = 0; i < List_Text_Oy.Count; i++)
            {
                g.DrawLine(new Pen(Color.White), new Point(pEnd_Oy_statistics.X, p_O.Y - distance_Oy), new Point(pEnd_Ox_Statistics.X, p_O.Y - ));
            }
            return pnl;
        }
    }
}
